package cn.tedu.mall.front.mappers;

import cn.tedu.mall.pojo.front.entity.FrontStockLog;
import cn.tedu.mall.pojo.product.vo.SkuStandardVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface FrontSkuMapper {

    List<SkuStandardVO> getSkuList(Long spuId);

    SkuStandardVO getSkuById(Long skuId);

    int decrStock(@Param("id") Long skuId, @Param("quantity") Integer quantity);

    void incrStock(@Param("id")Long skuId, @Param("quantity") Integer quantity);

    void insertStockLog(FrontStockLog frontStockLog);

    List<FrontStockLog> selectStockLogBySn(@Param("orderSN") String sn);
}
